import request from '@/utils/request'

// 查询工法编制参考列表
export function listGfbzck(query) {
  return request({
    url: '/kjcg/gfbzck/list',
    method: 'get',
    params: query
  })
}

// 查询工法编制参考详细
export function getGfbzck(gfbzckId) {
  return request({
    url: '/kjcg/gfbzck/' + gfbzckId,
    method: 'get'
  })
}

// 新增工法编制参考
export function addGfbzck(data) {
  return request({
    url: '/kjcg/gfbzck',
    method: 'post',
    data: data
  })
}

// 修改工法编制参考
export function updateGfbzck(data) {
  return request({
    url: '/kjcg/gfbzck',
    method: 'put',
    data: data
  })
}

// 删除工法编制参考
export function delGfbzck(gfbzckId) {
  return request({
    url: '/kjcg/gfbzck/' + gfbzckId,
    method: 'delete'
  })
}

// 获取工法编制参考主键ID
export function getGfBzCkId() {
  return request({
    url: '/kjcg/gfbzck/getGfBzCkId',
    method: 'get'
  })
}

// 新增附件
export function insertGfBzCkFjBygfbzckId(data) {
  return request({
    url: '/kjcg/gfbzck/add/File/By/subId',
    method: 'post',
    data: data
  })
}

// 根据主表ID查询附件列表
export function selectGfBzCkFjList(gfbzckId) {
  return request({
    url: '/kjcg/gfbzck/get/FileList/By/subId?sId=' + gfbzckId,
    method: 'get'
  })
}

// 删除工法编制参考附件
export function deleteGfbzckFjByFjIds(fjId) {
  return request({
    url: '/kjcg/gfbzck/fj/' + fjId,
    method: 'delete'
  })
}
